package com.itheima.dao;

import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMapper {
    @Select("SELECT r.* FROM t_user_role ur,t_role r WHERE ur.`role_id`=r.`id` AND ur.`user_id` = #{id}")
    List<Role> findRoleByUserId(int id);

    @Select("select * from t_role ")
    List<Role> getRoleList();
}
